Public Class DataAccess
    Inherits System.ComponentModel.Component
    'please check connection string of cnDrugs in " Component Designer generated code " region
    'If it is not there ,then add it with connections string =cnstr
#Region " Component Designer generated code "

    Public Sub New(Container As System.ComponentModel.IContainer)
        MyClass.New()

        'Required for Windows.Forms Class Composition Designer support
        Container.Add(me)
    End Sub

    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Component overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Component Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Component Designer
    'It can be modified using the Component Designer.
    'Do not modify it using the code editor.
    Friend WithEvents cmInsertDrugAction As System.Data.SqlClient.SqlCommand
    Friend WithEvents cmInsertDrugCaution As System.Data.SqlClient.SqlCommand
    Friend WithEvents cmInsertDrugContraIndicator As System.Data.SqlClient.SqlCommand
    Friend WithEvents cmInsertDrugIndications As System.Data.SqlClient.SqlCommand
    Friend WithEvents cmInsertDrugTheraputic As System.Data.SqlClient.SqlCommand
    Friend WithEvents cnDrugs As System.Data.SqlClient.SqlConnection
    Friend WithEvents cmInsertDrugSideEffects As System.Data.SqlClient.SqlCommand
    Friend WithEvents cmInsertDrugDose As System.Data.SqlClient.SqlCommand
    Friend WithEvents cmInsertDrug As System.Data.SqlClient.SqlCommand
    
    Friend WithEvents cmClearDrugsData As System.Data.SqlClient.SqlCommand
    'Friend WithEvents DsLookUpDrugs1 As dsLookUpDrugs
    'Friend WithEvents DsLookupPharamcyClass1 As dsLookupPharamcyClass
    'Friend WithEvents DsLookupTherapeuticClass1 As daLookupTherapeuticClass
    'Friend WithEvents DsDrugsByTherapeuticClass1 As dsDrugsByTherapeuticClass

    Friend WithEvents daDrugsByPharmacyClass As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand12 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daActions As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand5 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daLookupPharamcyClass As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand9 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daDrugIndicators As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daConTraIndicators As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand3 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daSideEffects As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand6 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daLookUpDrugs As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand8 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daTherapeutics As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand2 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daDose As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand7 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daCautions As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand4 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daDrugsByTherapeuticClass As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand11 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daLookupTherapeuticClass As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand10 As System.Data.SqlClient.SqlCommand
    Friend WithEvents daSelectDrug As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents cmSelectDrug As System.Data.SqlClient.SqlCommand
    Friend WithEvents DsDrugsByPharmacyClass1 As WebPlusMed.dsDrugsByPharmacyClass
    Friend WithEvents DsDrugsByTherapeuticClass1 As WebPlusMed.dsDrugsByTherapeuticClass
    Friend WithEvents DsActions1 As WebPlusMed.dsActions
    Friend WithEvents DsCautions1 As WebPlusMed.dsCautions
    Friend WithEvents DsContraIndicators1 As WebPlusMed.dsContraIndicators
    Friend WithEvents DsSideEffects1 As WebPlusMed.dsSideEffects
    Friend WithEvents DsLookupPharamcyClass1 As WebPlusMed.dsLookupPharamcyClass
    Friend WithEvents DaLookupTherapeuticClass1 As WebPlusMed.daLookupTherapeuticClass
    Friend WithEvents DsDrugIndicator1 As WebPlusMed.dsDrugIndicator
    Friend WithEvents DsLookUpDrugs1 As WebPlusMed.dsLookUpDrugs
    Friend WithEvents DsDrug1 As WebPlusMed.dsDrug
    Friend WithEvents DsTherapeutics1 As WebPlusMed.dsTherapeutics
    Friend WithEvents DsDose1 As WebPlusMed.dsDose
    Friend WithEvents cmClearSubData As System.Data.SqlClient.SqlCommand
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cnDrugs = New System.Data.SqlClient.SqlConnection
        Me.cmInsertDrugAction = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrugCaution = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrugContraIndicator = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrugIndications = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrugTheraputic = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrugSideEffects = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrugDose = New System.Data.SqlClient.SqlCommand
        Me.cmInsertDrug = New System.Data.SqlClient.SqlCommand
        Me.cmClearDrugsData = New System.Data.SqlClient.SqlCommand
        Me.daDrugsByPharmacyClass = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand12 = New System.Data.SqlClient.SqlCommand
        Me.daActions = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand5 = New System.Data.SqlClient.SqlCommand
        Me.daLookupPharamcyClass = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand9 = New System.Data.SqlClient.SqlCommand
        Me.daDrugIndicators = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
        Me.daConTraIndicators = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand3 = New System.Data.SqlClient.SqlCommand
        Me.daSideEffects = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand6 = New System.Data.SqlClient.SqlCommand
        Me.daLookUpDrugs = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand8 = New System.Data.SqlClient.SqlCommand
        Me.daTherapeutics = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand2 = New System.Data.SqlClient.SqlCommand
        Me.daDose = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand7 = New System.Data.SqlClient.SqlCommand
        Me.daCautions = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand4 = New System.Data.SqlClient.SqlCommand
        Me.daDrugsByTherapeuticClass = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand11 = New System.Data.SqlClient.SqlCommand
        Me.daLookupTherapeuticClass = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand10 = New System.Data.SqlClient.SqlCommand
        Me.daSelectDrug = New System.Data.SqlClient.SqlDataAdapter
        Me.cmSelectDrug = New System.Data.SqlClient.SqlCommand
        Me.DsDrugsByPharmacyClass1 = New WebPlusMed.dsDrugsByPharmacyClass
        Me.DsDrugsByTherapeuticClass1 = New WebPlusMed.dsDrugsByTherapeuticClass
        Me.DsActions1 = New WebPlusMed.dsActions
        Me.DsCautions1 = New WebPlusMed.dsCautions
        Me.DsContraIndicators1 = New WebPlusMed.dsContraIndicators
        Me.DsSideEffects1 = New WebPlusMed.dsSideEffects
        Me.DsLookupPharamcyClass1 = New WebPlusMed.dsLookupPharamcyClass
        Me.DaLookupTherapeuticClass1 = New WebPlusMed.daLookupTherapeuticClass
        Me.DsDrugIndicator1 = New WebPlusMed.dsDrugIndicator
        Me.DsLookUpDrugs1 = New WebPlusMed.dsLookUpDrugs
        Me.DsDrug1 = New WebPlusMed.dsDrug
        Me.DsTherapeutics1 = New WebPlusMed.dsTherapeutics
        Me.DsDose1 = New WebPlusMed.dsDose
        Me.cmClearSubData = New System.Data.SqlClient.SqlCommand
        CType(Me.DsDrugsByPharmacyClass1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsDrugsByTherapeuticClass1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsActions1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsCautions1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsContraIndicators1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsSideEffects1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsLookupPharamcyClass1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DaLookupTherapeuticClass1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsDrugIndicator1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsLookUpDrugs1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsDrug1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsTherapeutics1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsDose1, System.ComponentModel.ISupportInitialize).BeginInit()
        '
        'cmInsertDrugAction
        '
        Me.cmInsertDrugAction.CommandText = "dbo.[insert_tblDrugActions_1]"
        Me.cmInsertDrugAction.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugAction.Connection = Me.cnDrugs
        Me.cmInsertDrugAction.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugAction.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugAction.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchAction_2", System.Data.SqlDbType.VarChar, 1000))
        '
        'cmInsertDrugCaution
        '
        Me.cmInsertDrugCaution.CommandText = "dbo.[insert_tblDrugCaution_1]"
        Me.cmInsertDrugCaution.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugCaution.Connection = Me.cnDrugs
        Me.cmInsertDrugCaution.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugCaution.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugCaution.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchCaution_2", System.Data.SqlDbType.VarChar, 1000))
        '
        'cmInsertDrugContraIndicator
        '
        Me.cmInsertDrugContraIndicator.CommandText = "dbo.[insert_tblDrugContraIndicator_1]"
        Me.cmInsertDrugContraIndicator.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugContraIndicator.Connection = Me.cnDrugs
        Me.cmInsertDrugContraIndicator.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugContraIndicator.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugContraIndicator.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchContraIndicator_2", System.Data.SqlDbType.VarChar, 1000))
        '
        'cmInsertDrugIndications
        '
        Me.cmInsertDrugIndications.CommandText = "dbo.[insert_tblDrugIndications_1]"
        Me.cmInsertDrugIndications.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugIndications.Connection = Me.cnDrugs
        Me.cmInsertDrugIndications.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugIndications.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugIndications.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchIndication_2", System.Data.SqlDbType.VarChar, 1000))
        '
        'cmInsertDrugTheraputic
        '
        Me.cmInsertDrugTheraputic.CommandText = "dbo.[insert_tblDrugTheraputics_1]"
        Me.cmInsertDrugTheraputic.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugTheraputic.Connection = Me.cnDrugs
        Me.cmInsertDrugTheraputic.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugTheraputic.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugTheraputic.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchTheraputic_2", System.Data.SqlDbType.VarChar, 1000))
        '
        'cmInsertDrugSideEffects
        '
        Me.cmInsertDrugSideEffects.CommandText = "dbo.[insert_tblDrugSideEffects_1]"
        Me.cmInsertDrugSideEffects.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugSideEffects.Connection = Me.cnDrugs
        Me.cmInsertDrugSideEffects.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugSideEffects.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugSideEffects.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchSideEffect_2", System.Data.SqlDbType.VarChar, 1000))
        Me.cmInsertDrugSideEffects.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchArea_3", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrugSideEffects.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchSiginificance_4", System.Data.SqlDbType.VarChar, 50))
        '
        'cmInsertDrugDose
        '
        Me.cmInsertDrugDose.CommandText = "dbo.[insert_tblDrugDosage_1]"
        Me.cmInsertDrugDose.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrugDose.Connection = Me.cnDrugs
        Me.cmInsertDrugDose.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugDose.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID_1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrugDose.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchDrugDosage_2", System.Data.SqlDbType.VarChar, 1000))
        Me.cmInsertDrugDose.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchAdultChild_3", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrugDose.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchRoute_4", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrugDose.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchAgeWeight_5", System.Data.SqlDbType.VarChar, 50))
        '
        'cmInsertDrug
        '
        Me.cmInsertDrug.CommandText = "dbo.[insert_tblDrugs_1]"
        Me.cmInsertDrug.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmInsertDrug.Connection = Me.cnDrugs
        Me.cmInsertDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        Me.cmInsertDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchDrugName_1", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchCategory_2", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchTheraputicClass_3", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchPharamcyClass_4", System.Data.SqlDbType.VarChar, 50))
        Me.cmInsertDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchIsImported_5", System.Data.SqlDbType.Bit))
        '
        'cmClearDrugsData
        '
        Me.cmClearDrugsData.CommandText = "dbo.[ClearDatabase]"
        Me.cmClearDrugsData.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmClearDrugsData.Connection = Me.cnDrugs
        Me.cmClearDrugsData.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(10, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        '
        'daDrugsByPharmacyClass
        '
        Me.daDrugsByPharmacyClass.SelectCommand = Me.SqlSelectCommand12
        Me.daDrugsByPharmacyClass.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugs", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("intDrugID", "intDrugID"), New System.Data.Common.DataColumnMapping("vchDrugName", "vchDrugName"), New System.Data.Common.DataColumnMapping("vchCategory", "vchCategory"), New System.Data.Common.DataColumnMapping("vchTheraputicClass", "vchTheraputicClass"), New System.Data.Common.DataColumnMapping("vchPharamcyClass", "vchPharamcyClass")})})
        '
        'SqlSelectCommand12
        '
        Me.SqlSelectCommand12.CommandText = "SELECT DrugID, DrugName, Category, TheraputicClass, PharamcyClass FROM tblDrugs W" & _
        "HERE (PharamcyClass = @vchPharamcyClass) ORDER BY DrugName"
        Me.SqlSelectCommand12.Connection = Me.cnDrugs
        Me.SqlSelectCommand12.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchPharamcyClass", System.Data.SqlDbType.VarChar, 50, "PharamcyClass"))
        '
        'daActions
        '
        Me.daActions.SelectCommand = Me.SqlSelectCommand5
        Me.daActions.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugActions", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("intDrugID", "intDrugID"), New System.Data.Common.DataColumnMapping("vchAction", "vchAction")})})
        '
        'SqlSelectCommand5
        '
        Me.SqlSelectCommand5.CommandText = "SELECT DrugID, Action, DrugActionID FROM dbo.tblDrugActions WHERE (DrugID = @intD" & _
        "rugID)"
        Me.SqlSelectCommand5.Connection = Me.cnDrugs
        Me.SqlSelectCommand5.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daLookupPharamcyClass
        '
        Me.daLookupPharamcyClass.SelectCommand = Me.SqlSelectCommand9
        Me.daLookupPharamcyClass.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "LtblPharmacyClasses", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ClassID", "ClassID"), New System.Data.Common.DataColumnMapping("PharmacyClass", "PharmacyClass")})})
        '
        'SqlSelectCommand9
        '
        Me.SqlSelectCommand9.CommandText = "SELECT ClassID, PharmacyClass FROM dbo.LtblPharmacyClasses ORDER BY PharmacyClass" & _
        ""
        Me.SqlSelectCommand9.Connection = Me.cnDrugs
        '
        'daDrugIndicators
        '
        Me.daDrugIndicators.SelectCommand = Me.SqlSelectCommand1
        Me.daDrugIndicators.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugIndications", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("Indication", "Indication")})})
        '
        'SqlSelectCommand1
        '
        Me.SqlSelectCommand1.CommandText = "SELECT DrugID, Indication, IndicationsID FROM dbo.tblDrugIndications WHERE (DrugI" & _
        "D = @intDrugID)"
        Me.SqlSelectCommand1.Connection = Me.cnDrugs
        Me.SqlSelectCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daConTraIndicators
        '
        Me.daConTraIndicators.SelectCommand = Me.SqlSelectCommand3
        Me.daConTraIndicators.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugContraIndicator", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("vchContraIndicator", "ContraIndicator")})})
        '
        'SqlSelectCommand3
        '
        Me.SqlSelectCommand3.CommandText = "SELECT DrugID, ContraIndicator, DrugContraIndictorID FROM dbo.tblDrugContraIndica" & _
        "tor WHERE (DrugID = @intDrugID)"
        Me.SqlSelectCommand3.Connection = Me.cnDrugs
        Me.SqlSelectCommand3.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daSideEffects
        '
        Me.daSideEffects.SelectCommand = Me.SqlSelectCommand6
        Me.daSideEffects.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugSideEffects", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("Area", "Area"), New System.Data.Common.DataColumnMapping("Siginificance", "Siginificance"), New System.Data.Common.DataColumnMapping("SideEffect", "SideEffect")})})
        '
        'SqlSelectCommand6
        '
        Me.SqlSelectCommand6.CommandText = "SELECT DrugID, Area, Siginificance, SideEffect, DrugSideEffectID FROM dbo.tblDrug" & _
        "SideEffects WHERE (DrugID = @intDrugID)"
        Me.SqlSelectCommand6.Connection = Me.cnDrugs
        Me.SqlSelectCommand6.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daLookUpDrugs
        '
        Me.daLookUpDrugs.SelectCommand = Me.SqlSelectCommand8
        Me.daLookUpDrugs.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "LtblDrugs", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("DrugName", "DrugName")})})
        '
        'SqlSelectCommand8
        '
        Me.SqlSelectCommand8.CommandText = "SELECT DrugID, DrugName FROM dbo.LtblDrugs ORDER BY DrugName"
        Me.SqlSelectCommand8.Connection = Me.cnDrugs
        '
        'daTherapeutics
        '
        Me.daTherapeutics.SelectCommand = Me.SqlSelectCommand2
        Me.daTherapeutics.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugTheraputics", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("Theraputic", "Theraputic")})})
        '
        'SqlSelectCommand2
        '
        Me.SqlSelectCommand2.CommandText = "SELECT DrugID, Theraputic, DrugTheraputicID FROM dbo.tblDrugTheraputics WHERE (Dr" & _
        "ugID = @intDrugID)"
        Me.SqlSelectCommand2.Connection = Me.cnDrugs
        Me.SqlSelectCommand2.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daDose
        '
        Me.daDose.SelectCommand = Me.SqlSelectCommand7
        Me.daDose.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugDosage", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("Route", "Route"), New System.Data.Common.DataColumnMapping("AdultChild", "AdultChild"), New System.Data.Common.DataColumnMapping("AgeWeight", "AgeWeight"), New System.Data.Common.DataColumnMapping("DrugDosage", "DrugDosage")})})
        '
        'SqlSelectCommand7
        '
        Me.SqlSelectCommand7.CommandText = "SELECT DrugID, Route, AdultChild, AgeWeight, DrugDosage, DrugDosageID FROM dbo.tb" & _
        "lDrugDosage WHERE (DrugID = @intDrugID)"
        Me.SqlSelectCommand7.Connection = Me.cnDrugs
        Me.SqlSelectCommand7.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daCautions
        '
        Me.daCautions.SelectCommand = Me.SqlSelectCommand4
        Me.daCautions.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugCaution", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("Caution", "Caution")})})
        '
        'SqlSelectCommand4
        '
        Me.SqlSelectCommand4.CommandText = "SELECT DrugID, Caution, DrugCautionID FROM dbo.tblDrugCaution WHERE (DrugID = @in" & _
        "tDrugID)"
        Me.SqlSelectCommand4.Connection = Me.cnDrugs
        Me.SqlSelectCommand4.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'daDrugsByTherapeuticClass
        '
        Me.daDrugsByTherapeuticClass.SelectCommand = Me.SqlSelectCommand11
        Me.daDrugsByTherapeuticClass.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugs", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("DrugName", "DrugName"), New System.Data.Common.DataColumnMapping("Category", "Category"), New System.Data.Common.DataColumnMapping("TheraputicClass", "TheraputicClass"), New System.Data.Common.DataColumnMapping("PharamcyClass", "PharamcyClass")})})
        '
        'SqlSelectCommand11
        '
        Me.SqlSelectCommand11.CommandText = "SELECT DrugID, DrugName, Category, TheraputicClass, PharamcyClass FROM dbo.tblDru" & _
        "gs WHERE (TheraputicClass = @vchTherapyClass) ORDER BY DrugName"
        Me.SqlSelectCommand11.Connection = Me.cnDrugs
        Me.SqlSelectCommand11.Parameters.Add(New System.Data.SqlClient.SqlParameter("@vchTherapyClass", System.Data.SqlDbType.VarChar, 50, "TheraputicClass"))
        '
        'daLookupTherapeuticClass
        '
        Me.daLookupTherapeuticClass.SelectCommand = Me.SqlSelectCommand10
        Me.daLookupTherapeuticClass.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "LtblTherapeuticClasses", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ClassID", "ClassID"), New System.Data.Common.DataColumnMapping("TherapeuticClass", "TherapeuticClass")})})
        '
        'SqlSelectCommand10
        '
        Me.SqlSelectCommand10.CommandText = "SELECT ClassID, TherapeuticClass FROM dbo.LtblTherapeuticClasses ORDER BY Therape" & _
        "uticClass"
        Me.SqlSelectCommand10.Connection = Me.cnDrugs
        '
        'daSelectDrug
        '
        Me.daSelectDrug.SelectCommand = Me.cmSelectDrug
        Me.daSelectDrug.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "tblDrugs", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("DrugID", "DrugID"), New System.Data.Common.DataColumnMapping("DrugName", "DrugName"), New System.Data.Common.DataColumnMapping("Category", "Category"), New System.Data.Common.DataColumnMapping("TheraputicClass", "TheraputicClass"), New System.Data.Common.DataColumnMapping("PharamcyClass", "PharamcyClass")})})
        '
        'cmSelectDrug
        '
        Me.cmSelectDrug.CommandText = "SELECT DrugID, DrugName, Category, TheraputicClass, PharamcyClass FROM dbo.tblDru" & _
        "gs WHERE (DrugID = @intDrugID)"
        Me.cmSelectDrug.Connection = Me.cnDrugs
        Me.cmSelectDrug.Parameters.Add(New System.Data.SqlClient.SqlParameter("@intDrugID", System.Data.SqlDbType.Int, 4, "DrugID"))
        '
        'DsDrugsByPharmacyClass1
        '
        Me.DsDrugsByPharmacyClass1.DataSetName = "dsDrugsByPharmacyClass"
        Me.DsDrugsByPharmacyClass1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsDrugsByTherapeuticClass1
        '
        Me.DsDrugsByTherapeuticClass1.DataSetName = "dsDrugsByTherapeuticClass"
        Me.DsDrugsByTherapeuticClass1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsActions1
        '
        Me.DsActions1.DataSetName = "dsActions"
        Me.DsActions1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsCautions1
        '
        Me.DsCautions1.DataSetName = "dsCautions"
        Me.DsCautions1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsContraIndicators1
        '
        Me.DsContraIndicators1.DataSetName = "dsContraIndicators"
        Me.DsContraIndicators1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsSideEffects1
        '
        Me.DsSideEffects1.DataSetName = "dsSideEffects"
        Me.DsSideEffects1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsLookupPharamcyClass1
        '
        Me.DsLookupPharamcyClass1.DataSetName = "dsLookupPharamcyClass"
        Me.DsLookupPharamcyClass1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DaLookupTherapeuticClass1
        '
        Me.DaLookupTherapeuticClass1.DataSetName = "daLookupTherapeuticClass"
        Me.DaLookupTherapeuticClass1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsDrugIndicator1
        '
        Me.DsDrugIndicator1.DataSetName = "dsDrugIndicator"
        Me.DsDrugIndicator1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsLookUpDrugs1
        '
        Me.DsLookUpDrugs1.DataSetName = "dsLookUpDrugs"
        Me.DsLookUpDrugs1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsDrug1
        '
        Me.DsDrug1.DataSetName = "dsDrug"
        Me.DsDrug1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsTherapeutics1
        '
        Me.DsTherapeutics1.DataSetName = "dsTherapeutics"
        Me.DsTherapeutics1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'DsDose1
        '
        Me.DsDose1.DataSetName = "dsDose"
        Me.DsDose1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'cmClearSubData
        '
        Me.cmClearSubData.CommandText = "dbo.[ClearSubscriberDatabase]"
        Me.cmClearSubData.CommandType = System.Data.CommandType.StoredProcedure
        Me.cmClearSubData.Connection = Me.cnDrugs
        Me.cmClearSubData.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        '
        'cnDrugs
        '
        Me.cnDrugs.ConnectionString = gstrConnectionString



        CType(Me.DsDrugsByPharmacyClass1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsDrugsByTherapeuticClass1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsActions1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsCautions1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsContraIndicators1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsSideEffects1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsLookupPharamcyClass1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DaLookupTherapeuticClass1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsDrugIndicator1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsLookUpDrugs1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsDrug1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsTherapeutics1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsDose1, System.ComponentModel.ISupportInitialize).EndInit()

    End Sub

#End Region



#Region "Drugs Stuff"

    Friend Function InsertDrug(ByVal strDrugName As String, ByVal strDrugCategory As String, ByVal strTherapeuticClass As String, ByVal strPharamcyClass As String, ByVal BlnIsImported As Boolean) As Integer
        Try
            With Me.cmInsertDrug
                .Parameters("@vchDrugName_1").Value = strDrugName
                .Parameters("@vchCategory_2").Value = strDrugCategory
                .Parameters("@vchTheraputicClass_3").Value = strTherapeuticClass
                .Parameters("@vchPharamcyClass_4").Value = strPharamcyClass
                .Parameters("@vchIsImported_5").Value = BlnIsImported
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugIndication(ByVal intDrugID As Integer, ByVal strText As String) As Integer
        Try
            With Me.cmInsertDrugIndications
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchIndication_2").Value = strText
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugAction(ByVal intDrugID As Integer, ByVal strText As String) As Integer
        Try
            With Me.cmInsertDrugAction
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchAction_2").Value = strText
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugContraIndications(ByVal intDrugID As Integer, ByVal strText As String) As Integer
        Try
            With Me.cmInsertDrugContraIndicator
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchContraIndicator_2").Value = strText
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugCaution(ByVal intDrugID As Integer, ByVal strText As String) As Integer
        Try
            With Me.cmInsertDrugCaution
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchCaution_2").Value = strText
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugTheraputicEffect(ByVal intDrugID As Integer, ByVal strText As String) As Integer
        Try
            With Me.cmInsertDrugTheraputic
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchTheraputic_2").Value = strText
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugSideEffect(ByVal intDrugID As Integer, ByVal strEffect As String, ByVal strArea As String, ByVal strSignificance As String) As Integer
        Try
            With Me.cmInsertDrugSideEffects
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchSideEffect_2").Value = strEffect
                .Parameters("@vchArea_3").Value = strArea
                .Parameters("@vchSiginificance_4").Value = strSignificance
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function InsertDrugDose(ByVal intDrugID As Integer, ByVal strDose As String, ByVal strAdultChild As String, ByVal strRoute As String, ByVal strAgeWeight As String) As Integer
        Try
            With Me.cmInsertDrugDose
                .Parameters("@intDrugID_1").Value = intDrugID
                .Parameters("@vchDrugDosage_2").Value = strDose
                .Parameters("@vchAdultChild_3").Value = strAdultChild
                .Parameters("@vchRoute_4").Value = strRoute
                .Parameters("@vchAgeWeight_5").Value = strAgeWeight
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                Return .Parameters("@RETURN_VALUE").Value
            End With
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

    Friend Function ClearDrugsData() As Boolean
        Dim intSuccess As Integer
        Try
            With Me.cmClearDrugsData
                Me.cnDrugs.Open()
                .ExecuteNonQuery()
                intSuccess = .Parameters("@RETURN_VALUE").Value
            End With

            If intSuccess = 1 Then
                Return True
            Else
                Return False
            End If
        Catch ex As Exception
            Throw ex
        Finally
            If Me.cnDrugs.State = ConnectionState.Open Then
                Me.cnDrugs.Close()
            End If
        End Try
    End Function

#End Region

   
End Class
